package com.general.framework.core.constant;

/**
 * 通用常量信息
 * @author leejean
 */
public class Constants {
    /**
     * UTF-8 字符集
     */
    public static final String UTF8 = "UTF-8";

    /**
     * GBK 字符集
     */
    public static final String GBK = "GBK";

    /**
     * http请求
     */
    public static final String HTTP = "http://";

    /**
     * https请求
     */
    public static final String HTTPS = "https://";


    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 注册
     */
    public static final String REGISTER = "Register";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * 图形验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";

    /**
     * 短信验证码 redis key
     */
    public static final String SMS_CODE_KEY = "sms_codes:";

    /**
     * Admin登录用户 redis key
     */
    public static final String ADMIN_LOGIN_TOKEN_KEY = "admin_login_tokens:";

    /**
     * app登录用户 redis key
     */
    public static final String APP_LOGIN_TOKEN_KEY = "app_login_tokens:";

    /**
     * 二维码登录 redis key
     */
    public static final String LOGIN_QR_CODE_KEY = "login_qr_codes:";

    /**
     * 防重提交 redis key
     */
    public static final String REPEAT_SUBMIT_KEY = "repeat_submit:";

    /**
     * 限流 redis key
     */
    public static final String RATE_LIMIT_KEY = "rate_limit:";

    /**
     * 限流默认message
     */
    public static final String RATE_LIMIT_MESSAGE = "访问过于频繁，请稍后再试";

    /**
     * 登录图形码验证码有效期（分钟）
     */
    public static final Long CAPTCHA_EXPIRATION = 2L;

    /**
     * 令牌
     */
    public static final String TOKEN = "token";

    /**
     * 远程协助
     */
    public static final String REMOTE_ASSISTANCE = "remoteAssistance";

    /**
     * 令牌前缀
     */
    public static final String TOKEN_PREFIX = "Bearer ";

    /**
     * admin 登录用户key
     */
    public static final String LOGIN_USER_KEY = "login_user_key";

    /**
     * 参数管理 cache key
     */
    public static final String CACHE_CONFIG_KEY = "config:";

}
